fix(filesystem): only change folder permissions if required
authorJyrki Gadinger <nilsding@nilsding.org>
Tue, 20 May 2025 17:25:53 +0000 (19:25 +0200)
committerJyrki Gadinger <nilsding@nilsding.org>
Mon, 2 Jun 2025 12:53:00 +0000 (14:53 +0200)
commit012a6fc7d39655dddc11482322b1094f92e6bf1e
tree9718f46321d1b2f78c8397ea17df85948804a819
parentc28d0baf993a7a7158a7137590ee0babb8c74544
fix(filesystem): only change folder permissions if required

On Linux changing the permissions causes inotify to create a IN_ATTRIB
event -- even if the permissions stays the same.

Such an event is passed to the filesystem watcher which lets the client
schedule a new sync run.  In certain conditions, this could happen
during every sync run...

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
src/libsync/filesystem.cpp
src/libsync/filesystem.h
test/CMakeLists.txt
test/testfilesystem.cpp [new file with mode: 0644]